/*
 * Lab09D.cpp
 *
 *  Created on: Apr 17, 2014
 *      Author: tony
 */




#include <iostream>
using std::cout;
using std::endl;

#include <fstream>
using std::ifstream;
using std::ios;

#include <string>
using std::string;

#include <unordered_set>
using std::unordered_set;



int main(){
	cout << "CSIS 237 Lab 9 D - C++ Standard Library unordered_set" << endl;
	char filename[] = "src/Sonnets.txt";
	cout << " Reading from file: " << filename << " . . . " << endl;

	ifstream input( filename, ios::in );
	unordered_set<string> unique_strings;

	int count = 0;
	while (!input.eof()){
		string s;
		input >> s;
		count++;
		unique_strings.insert( s );
	}

	cout << "Done reading " << filename << "." << endl;
	cout << " There were a total of " << count << " strings and "
			<< unique_strings.size() << " unique strings in the file." << endl;
	input.close();
}
